using System;

namespace Sedna.Core.Persistence
{
	/// <summary>
	/// defines how to create ICriterion (namely which equality criteria to use) while processing IFilterState properties
	/// </summary>
	public enum FilterEquality
	{
		/// <summary>
		/// default and specific to a corresponding data type.
		/// i.e. if a data type is String, then the FullLike
		/// strategy is used, whereas if a data type is Int32 
		/// the Eq (i.e. strict equality) is used
		/// </summary>
		Default = 1,

		/// <summary>
		/// strict equality (if it is a string then equality is based upon the underlying SQL == implementation)
		/// </summary>
		Eq,

		/// <summary>
		/// greater than (>)
		/// </summary>
		Gt,

		/// <summary>
		/// less than (<)
		/// </summary>
		Lt,

		/// <summary>
		/// greater or equals (>=)
		/// </summary>
		GtOrEq,

		/// <summary>
		/// less or equals  (<=)
		/// </summary>
		LtOrEq,

		/// <summary>
		/// equivalent to SQL field like '%value%'
		/// </summary>
		FullLike,

		/// <summary>
		/// equivalent to SQL field like 'value%'
		/// </summary>
		LeftLike,

		/// <summary>
		/// not equals
		/// </summary>
		NotEq,

		/// <summary>
		/// special case for date or number range - to define a range opening
		/// (e.g. date from)
		/// in this case the target property name shall be the same as the 
		/// target property name (<see cref="FilterPropertyAttribute.FieldName"/>) 
		/// for the property that defines the RangeTo
		/// (as a result the SQL between clause is generated)
		/// </summary>
		RangeFrom,

		/// <summary>
		/// special case for date or number rage - to define a range closing
		/// (e.g. date to)
		/// in this case the target property name shall be the same as the 
		/// target property name (<see cref="FilterPropertyAttribute.FieldName"/>) 
		/// for the property that defines the RangeFrom
		/// (as a result the SQL between clause is generated)
		/// </summary>
		RangeTo,

		/// <summary>
		/// equavalent to SQL in clause (e.g. ...where ID in (1,2,3))
		/// </summary>
		In
	}
}
